Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing /
Chapter 2 - Core Printing Features / Core Printing Features Reference
Functions / Creating and Managing Job Objects


GXNewJob

You can use the GXNewJob function to create a job object to associate with a printable document.

OSErr GXNewJob (gxJob *aJob);
aJob
On return, a reference to the newly created job object.
function result
An error code of type OSErr.
DESCRIPTION
The GXNewJob function allocates space for a job object and returns a reference to the job object. You need to call this function each time a user creates a new printable document.

When QuickDraw GX creates a new job object, it contains default values. Specifically, it contains a default format and a default paper type. The default format and default paper type are defined by the default output printer's printer driver. If there is no default output printer's printer driver, the job object uses the format and paper type associated with "Any Printer."

You should call the GXInstallApplicationOverride function after you call the GXNewJob function to support QuickDraw GX print dialog boxes.

When a user closes a document, you need to dispose of a job object using the GXDisposeJob function.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found, or there was not enough memory to load it.
gxPaperTypeNotFoundThe default paper-type object cannot be located.
SEE ALSO
Listing 2-1 on page 2-12 shows how to use the GXNewJob function to create a job object for a printable document.

The GXInstallApplicationOverride function for supporting QuickDraw GX print dialog boxes is described on page 2-71.

To dispose of a job object, see the description of the GXDisposeJob function in the next section.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help